import Vue from 'vue'
import Router from 'vue-router'
import Player from '@/components/Player/Index'

import Path from './path.js'


Vue.use(Router)

export default new Router({
  routes: [
  	{
  		path: '/sheets',
  		name: 'Sheets',
      	component: Path.Sheets,
      	children:[
	      	{
	      		path: 'hots',
	      		name: '热门歌单',
	      		component: Path.HotsSheets,
	      	},
          {
            path: 'highquality',
            name: '精品歌单',
            component: Path.HighQuality,
          },
          {
            path: 'details',
            name: '歌单详情',
            component: Path.SheetsDetails,
            children:[{
              path: ':id',
              name: '歌单',
              component: Path.SheetsDetailsShow
            }]
          }
      	]
  	},
    {
      path: '/fm',
      name: 'FM',
      component: Path.FM,
      meta:{requireAuth:true},
      children:[
      {
        path: 'personal',
        name: '私人FM',
        component: Path.FM_Personal,

      }]
    },
    {
      path: '/recommend',
      name: 'Recommend',
      component: Path.Recommend,
      meta:{requireAuth:true},
      children:[
      {
        path: 'songs',
        name: '推荐音乐',
        component: Path.RecommendSongs
      }]
    },


    {
      path: '/login',
      name: '登录',
      component: Path.Login
    },
    {
      path: '/register',
      name: '注册',
      component: Path.Register
    },
    {
      path: '/user',
      name: '个人中心',
      meta:{requireAuth:true},
      component: Path.User
    },

    {
      path: '/map',
      name: 'Map',
      component: Path.Map
    },
    {
	    path: '/',
	    name: 'Index',
	    component: Path.Index
    },
    // {
    //   path: '*',
    //   name: 'Player',
    //   component: Player
    // }
  ]
})
